<template>
	<view class="u-page">
		<view class="header"></view>
		
		<view class="content">
			<view class="projecttitle">{{data.title}}</view>
		
			<view class="projectcontent">
				<u-parse :content="data.content" ></u-parse>
			</view>
		</view>
		
		
		
	</view>
</template>

<script>
	import uParse from '@/components/u-parse/u-parse.vue'
	
	export default {
		components: {
		    uParse
		  },
		data() {
			return {
				id:'',
				title:'',
				data:{}
			}
			
		},
		onLoad(option) {
			this.id = option.id
			this.activles()
		},
		methods: {
			async activles(pid){
				
				const activles = await this.GQL({
					"operationName": "allSlSystemArticles",
					"query": "query allSlSystemArticles($filter: SlSystemArticleFilter) { allSlSystemArticles(filter: $filter) { nodes { id info title  content} } }",
					"variables": {"filter": {"type": {"equalTo": "2"},"id":{'equalTo':this.id}}}
				})
				
				if(activles.data.allSlSystemArticles.nodes){
					this.data = activles.data.allSlSystemArticles.nodes[0]
					this.title = activles.data.allSlSystemArticles.nodes[0].title
				}
			},
			goback(){
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss">
	.u-page{
		background-color: #FBFCFE;
	}
	 .header{
	 	width: 100%;
	 	height: 260px;
	 	/* color: #FFFFFF; */
		background: linear-gradient(#C7171E, #f0f2f5); /* 标准的语法 */
	 
	 }
	 .content{
		 position: relative;
		 margin: 30rpx;
		 padding: 30rpx;
		 background-color: #FFFFFF;
		 min-height: 100vh;
		 border-radius: 10px;
		 top: -240px;
		 .projecttitle{
			 font-size: 32rpx;
			 color: #161E3E;
			 font-weight: 600;
			 padding-top: 10rpx;
			 min-height: 90rpx;
			 box-sizing: border-box;
		 }
		
		 .projectcontent{
			 margin: 15px 0;
			 
		 }
		 
		 .projectUser{
			 margin: 10px;
			 color: #161E3E;
			 font-size: 16px;
			 image{
				 width: 13px;
				 height:13px;
				 padding-right: 5px;
			 }
			 .name{
				 color: #767B8D;
				 margin-left: 10px;
			 }
			
		 }
		 .CarId{
			 padding: 10px 0px 20px 0px;
			 font-size: 15px;
			 color: #007AFE;
		 }
		 .ID{
			 font-size: 15px;
			 color: #838898;
		 }
		 .projectId{
			 margin: 20px 10px 20px 10px;
			 border-bottom: 1px solid #D8D8D8;
		 }
		 .projectAddress{
			  margin: 20px 10px 20px 10px;
		 }
		 .projectFile{
			  margin: 20px 10px 20px 10px;
		 }
	 }

</style>
